<?xml version='1.0' encoding='UTF-8' ?>  
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">    
<ui:composition 
    xmlns="http://www.w3.org/1999/xhtml"  
    xmlns:ui="http://java.sun.com/jsf/facelets"  
    xmlns:h="http://java.sun.com/jsf/html"  
    template="./template_default.xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui"
    >  

    <ui:define name="complementTitreEtH1">Liste des comptes bancaires</ui:define>  

    <ui:define name="content">  

        <!--<h:form>-->


        <p:dataTable value="#{compteBancaireBean.listCB}" var="item" emptyMessage="No customer found with given criteria" paginator="true" rows="10" rendered="#{compteBancaireBean.connectedAdmin}">
            <!--<p:inputText widgetVar="customerTable"></p:inputText>-->

            <p:column headerText="actions" width="40px">  

                <h:commandLink action="#{compteBancaireBean.supprimerCompteBancaireAdmin(item)}" >  
                    <h:graphicImage value="ressources/delete.png" alt="logoDelete" border="0" class="imgDelete"/>  
                </h:commandLink> 
                &nbsp;
                <h:commandLink action="#{compteBancaireBean.chargerTransfererCompteBancaire(item)}" >  
                    <h:graphicImage value="ressources/transfert.jpg" alt="logoTransfert" border="0" class="imgDelete"/>  
                </h:commandLink> 

            </p:column>

            <p:column sortBy="#{item.id}" filterBy="#{item.id}" filterMatchMode="contains">
                <f:facet name="header">
                    <h:outputText value="id"/>
                </f:facet>
                <h:outputText value="#{item.id}"/>
            </p:column>

            <p:column sortBy="#{item.proprietaireCompte.login}" filterBy="#{item.proprietaireCompte.login}" filterMatchMode="contains">
                <f:facet name="header">
                    <h:outputText value="login"/>
                </f:facet>
                <h:outputText value="#{item.proprietaireCompte.login}"/>
            </p:column>
            
            <p:column sortBy="#{item.soldeCompte}" filterBy="#{item.soldeCompte}" filterMatchMode="contains">
                <f:facet name="header">
                    <h:outputText value="Solde"/>
                </f:facet>
                <h:outputText value="#{item.soldeCompte}"/>
            </p:column>
            
            <p:column sortBy="#{item.description}" width="40px">
                <f:facet name="header">
                    <h:outputText value="Type"/>
                </f:facet>
                <h:outputText value="#{item.description}"/>
            </p:column>

            <p:column headerText="CompteId">  
                <f:facet name="header">
                    <h:outputText value="Opérations"/>
                </f:facet>
                <h:commandLink action="#{compteBancaireBean.chargerOperations(item)}" value="Details"/> 



            </p:column>



        </p:dataTable>

        <!--</h:form>-->


    </ui:define>  

</ui:composition>  


